<?php
class DbTools
{
    private static $coon;
    public static function setCoon($coon){
        self::$coon = $coon;
    }
    public static function select($sql){
        $result = self::$coon->query($sql);
        $data = [];
        while (true){
            $row = $result->fetch_assoc();
            if(empty($row)){
                break;
            }
            $data = $row;
        }
        return $data;
    }
}
